package com.uzai.console.enums;

import org.apache.commons.lang3.StringUtils;

/**
 * 粉丝收益报表面板显示字段枚举
 *
 * @Auther: liuqi
 * @Date: 2021/8/19 11:22
 * @Description:
 */
public enum ReportBanelFansValueShowFieldEnum {
    DEVICENAME("deviceName", "机器人昵称"),
    DEVICEREMARK("deviceRemark", "机器人备注"),
    TIMER("timer", "时间选择器"),
    REGISTERUSERCOUNT("registerUserCount", "注册会员数"),
    DIRECTUSERCOUNT("directUserCount", "直接添加会员数"),
    FISSIONUSERCOUNT("fissionUserCount", "裂变会员数"),

    SOURCE("source", "来源"),

    ;

    private String key;
    private String desc;

    ReportBanelFansValueShowFieldEnum(String key, String desc) {
        this.key = key;
        this.desc = desc;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static ReportBanelFansValueShowFieldEnum getByKey(String key) {
        if (StringUtils.isBlank(key)) {
            return null;
        }
        for (ReportBanelFansValueShowFieldEnum type: ReportBanelFansValueShowFieldEnum.values()) {
            if (type.getKey().equals(key)) {
                return type;
            }
        }
        return null;
    }
}
